﻿/**
 * ...
 * @author aboutwhat
 */

package bloom.lang;



class DoubleIterator<T, S>
{
    var a : Iterator<T>;
    var b : Iterator<S>;
    
    
    
    public function new (a, b)
    {
        
        Assert.assertEquals( Lambda.count( a ) , Lambda.count( b ) );
        
        this.a = a.iterator();
        this.b = b.iterator();
    }
    
    public function hasNext ()
    {
        return a.hasNext();
    }
    
    public function next () {
        return 
        {
            e1 : a.next(),
            e2 : b.next()
        }
    }
    
}